package com.neuedu.qian.controller;

import com.neuedu.qian.vo.ResponseData;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import com.neuedu.qian.entity.User;
import com.neuedu.qian.service.IUserService;

/**
* Author lu
* Date   2025-07-31 09:49:29
*/
@Log4j2
@RequestMapping("/qian/api/user")
@RestController
@Tag(name = "控制器")
public class UserController  {

    @Autowired
    @Qualifier("userService")
    private IUserService userService;
    /**
     * 管理员登录
     * @param account 账号
     * @param password 密码
     * @return 登录结果
     */
    @Operation(summary = "管理员登录")
    @PostMapping("/login")
    public ResponseData  login(@RequestParam String account,@RequestParam String password){
        return userService.login(account,password);
    }

}